<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>UnitreeCameraSDK: include/SystemLog.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">UnitreeCameraSDK
   &#160;<span id="projectnumber">1.0.1</span>
   </div>
   <div id="projectbrief">unitree stereo camra apis</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">SystemLog.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_system_log_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#ifndef __SYSTEMLOG_HPP__</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#define __SYSTEMLOG_HPP__</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_system_log.html">   18</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_system_log.html">SystemLog</a></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="keywordtype">int</span> m_logLevel;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keywordtype">bool</span> m_isSave;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    std::string m_logName;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    std::string m_logFileName;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    </div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <a class="code" href="class_system_log.html#aad41c68c3a8192ddb646170349023c99">SystemLog</a>(std::string logName);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    </div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">public</span>:    </div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#a21296bb67489848bad6cfa04280fec85">setLogLevel</a>(<span class="keywordtype">int</span> level);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#ac33b9f16ae96885ff7170d209a6af506">runTimeError</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format,...);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#ac9b085c959e3f97d547c997c2fca2613">runTimeInfo</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format,...);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#a69d19a4affe470db2b740a1e9a78e6e5">runTimeWarning</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format,...);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#a08dff4b478ed29a39d584d3b7f21ddfb">debugTimeWarning</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format,...);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#ad79238fdcc9a301093d6fa32884d1ae1">debugTimeInfo</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format,...);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#ae1cbe2de51efe22068e2e047396a72dd">debugTimeError</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format,...);</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#a9714a265975472433882962b7449bd45">saveLog</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_system_log.html#af41d346f86242f5be187fe2be354347d">saveLogToFile</a>(std::string fileName) ;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;};</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="preprocessor">#endif //__SYSTEMLOG_HPP__</span></div><div class="ttc" id="class_system_log_html_a9714a265975472433882962b7449bd45"><div class="ttname"><a href="class_system_log.html#a9714a265975472433882962b7449bd45">SystemLog::saveLog</a></div><div class="ttdeci">void saveLog(void)</div><div class="ttdoc">save system log to a file, default file name: Running.txt </div></div>
<div class="ttc" id="class_system_log_html_a21296bb67489848bad6cfa04280fec85"><div class="ttname"><a href="class_system_log.html#a21296bb67489848bad6cfa04280fec85">SystemLog::setLogLevel</a></div><div class="ttdeci">void setLogLevel(int level)</div><div class="ttdoc">set system ouput log level </div></div>
<div class="ttc" id="class_system_log_html_aad41c68c3a8192ddb646170349023c99"><div class="ttname"><a href="class_system_log.html#aad41c68c3a8192ddb646170349023c99">SystemLog::SystemLog</a></div><div class="ttdeci">SystemLog(std::string logName)</div><div class="ttdoc">SystemLog constructor. </div></div>
<div class="ttc" id="class_system_log_html_a69d19a4affe470db2b740a1e9a78e6e5"><div class="ttname"><a href="class_system_log.html#a69d19a4affe470db2b740a1e9a78e6e5">SystemLog::runTimeWarning</a></div><div class="ttdeci">void runTimeWarning(const char *format,...)</div><div class="ttdoc">output running warning infomation, color: yellow </div></div>
<div class="ttc" id="class_system_log_html_ac9b085c959e3f97d547c997c2fca2613"><div class="ttname"><a href="class_system_log.html#ac9b085c959e3f97d547c997c2fca2613">SystemLog::runTimeInfo</a></div><div class="ttdeci">void runTimeInfo(const char *format,...)</div><div class="ttdoc">output running infomation, color: green </div></div>
<div class="ttc" id="class_system_log_html_ad79238fdcc9a301093d6fa32884d1ae1"><div class="ttname"><a href="class_system_log.html#ad79238fdcc9a301093d6fa32884d1ae1">SystemLog::debugTimeInfo</a></div><div class="ttdeci">void debugTimeInfo(const char *format,...)</div><div class="ttdoc">output debug infomation, color: white </div></div>
<div class="ttc" id="class_system_log_html"><div class="ttname"><a href="class_system_log.html">SystemLog</a></div><div class="ttdef"><b>Definition:</b> SystemLog.hpp:18</div></div>
<div class="ttc" id="class_system_log_html_ac33b9f16ae96885ff7170d209a6af506"><div class="ttname"><a href="class_system_log.html#ac33b9f16ae96885ff7170d209a6af506">SystemLog::runTimeError</a></div><div class="ttdeci">void runTimeError(const char *format,...)</div><div class="ttdoc">output running error infomation, color: red </div></div>
<div class="ttc" id="class_system_log_html_a08dff4b478ed29a39d584d3b7f21ddfb"><div class="ttname"><a href="class_system_log.html#a08dff4b478ed29a39d584d3b7f21ddfb">SystemLog::debugTimeWarning</a></div><div class="ttdeci">void debugTimeWarning(const char *format,...)</div><div class="ttdoc">output debug warning infomation, color: cyan </div></div>
<div class="ttc" id="class_system_log_html_af41d346f86242f5be187fe2be354347d"><div class="ttname"><a href="class_system_log.html#af41d346f86242f5be187fe2be354347d">SystemLog::saveLogToFile</a></div><div class="ttdeci">void saveLogToFile(std::string fileName)</div><div class="ttdoc">save system log to a designated file </div></div>
<div class="ttc" id="class_system_log_html_ae1cbe2de51efe22068e2e047396a72dd"><div class="ttname"><a href="class_system_log.html#ae1cbe2de51efe22068e2e047396a72dd">SystemLog::debugTimeError</a></div><div class="ttdeci">void debugTimeError(const char *format,...)</div><div class="ttdoc">output debug error infomation, color: magenta </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
